Functions | |
| def | decoding_char (ctypes_char_array) |
Variables | |
| currentsystem = platform.system() | |
| input_func = raw_input | |
| SDKVersion = MvCamera.MV_CC_GetSDKVersion() | |
| deviceList = MV_CC_DEVICE_INFO_LIST() | |
| tuple | t_layer_type |
| ret = MvCamera.MV_CC_EnumDevices(t_layer_type, deviceList) | |
| mvcc_dev_info = cast(deviceList.pDeviceInfo[i], POINTER(MV_CC_DEVICE_INFO)).contents | |
| def | strModeName = decoding_char(mvcc_dev_info.SpecialInfo.stGigEInfo.chModelName) |
| def | strSerialNumber = decoding_char(mvcc_dev_info.SpecialInfo.stGigEInfo.chSerialNumber) |
| tuple | nip1 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0xff000000) >> 24) |
| tuple | nip2 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x00ff0000) >> 16) |
| tuple | nip3 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x0000ff00) >> 8) |
| tuple | nip4 = (mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x000000ff) |
| def | strUserDefinedName = decoding_char(mvcc_dev_info.SpecialInfo.stGigEInfo.chUserDefinedName) |
| nConnectionNum = input_func("please input the number of the device to connect:") | |
| cam = MvCamera() | |
| stDeviceList = cast(deviceList.pDeviceInfo[int(nConnectionNum)], POINTER(MV_CC_DEVICE_INFO)).contents | |
| nPacketSize = cam.MV_CC_GetOptimalPacketSize() | |
| nDevPayloadSize = c_uint64() | |
| nMemAlignment = c_uint() | |
| nPayloadSize = nDevPayloadSize.value | |
| stOutFrame = MV_FRAME_OUT() | |
| dst_size = nPayloadSize | |
| HB_decode_param = MV_CC_HB_DECODE_PARAM() | |
| pSrcBuf | |
| nSrcLen | |
| nDstBufSize | |
| pDstBuf | |
| string | c_file_path = "image.bmp".encode('ascii') |
| int | nRGBSize = stOutFrame.stFrameInfo.nWidth * stOutFrame.stFrameInfo.nHeight * 4 + 2048 |
| stSaveParam = MV_SAVE_IMAGE_TO_FILE_PARAM_EX() | |
| nWidth | |
| nHeight | |
| pData | |
| enImageType | |
| nDataLen | |
| enPixelType | |
| nQuality | |
| iMethodValue | |
| pcImagePath | |
| def BasicDemoLineScanCamera.decoding_char | ( | ctypes_char_array | ) |
Safely decode a string from a ctypes character array. Compatible with Python 2.x and 3.x, as well as 32-bit and 64-bit environments.
| currentsystem = platform.system() |
| input_func = raw_input |
| SDKVersion = MvCamera.MV_CC_GetSDKVersion() |
| deviceList = MV_CC_DEVICE_INFO_LIST() |
| tuple t_layer_type |
| ret = MvCamera.MV_CC_EnumDevices(t_layer_type, deviceList) |
| mvcc_dev_info = cast(deviceList.pDeviceInfo[i], POINTER(MV_CC_DEVICE_INFO)).contents |
| def strModeName = decoding_char(mvcc_dev_info.SpecialInfo.stGigEInfo.chModelName) |
| def strSerialNumber = decoding_char(mvcc_dev_info.SpecialInfo.stGigEInfo.chSerialNumber) |
| tuple nip1 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0xff000000) >> 24) |
| tuple nip2 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x00ff0000) >> 16) |
| tuple nip3 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x0000ff00) >> 8) |
| tuple nip4 = (mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x000000ff) |
| def strUserDefinedName = decoding_char(mvcc_dev_info.SpecialInfo.stGigEInfo.chUserDefinedName) |
| nConnectionNum = input_func("please input the number of the device to connect:") |
| cam = MvCamera() |
| stDeviceList = cast(deviceList.pDeviceInfo[int(nConnectionNum)], POINTER(MV_CC_DEVICE_INFO)).contents |
| nPacketSize = cam.MV_CC_GetOptimalPacketSize() |
| nDevPayloadSize = c_uint64() |
| nMemAlignment = c_uint() |
| nPayloadSize = nDevPayloadSize.value |
| stOutFrame = MV_FRAME_OUT() |
| dst_size = nPayloadSize |
| HB_decode_param = MV_CC_HB_DECODE_PARAM() |
| pSrcBuf |
| nSrcLen |
| nDstBufSize |
| pDstBuf |
| string c_file_path = "image.bmp".encode('ascii') |
| int nRGBSize = stOutFrame.stFrameInfo.nWidth * stOutFrame.stFrameInfo.nHeight * 4 + 2048 |
| stSaveParam = MV_SAVE_IMAGE_TO_FILE_PARAM_EX() |
| nWidth |
| nHeight |
| pData |
| enImageType |
| nDataLen |
| enPixelType |
| nQuality |
| iMethodValue |
| pcImagePath |